package com.mornd.web.controller.purchase;

import com.mornd.common.core.domain.AjaxResult;
import com.mornd.common.core.domain.entity.SysRole;
import com.mornd.system.service.ISysUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: mornd
 * @dateTime: 2023/7/30 - 17:45
 */

@RestController
@RequestMapping("/purchase")
public class PurchaseController {
    @Resource
    private ISysUserService userService;

    @GetMapping("/assignList")
    public AjaxResult assignList() {
        SysRole sysRole = new SysRole();
        sysRole.setRoleKey("purchase");
        return AjaxResult.success(userService.listByRole(sysRole));
    }
}
